File: index/index.phtml

<pre>
<? print_r($this->user) ?>
</pre>

<? if ( $this->loggedIn === false ): ?>

<p><?= $this->error ?></p>
<form method="post" action="/login">
User: <input type="text" name="username" /><br />
Pass: <input type="password" name="password" /><br />
<input type="hidden" name="referrer" value="<?=$_SERVER['SCRIPT_NAME']?>" />
<input type="submit" />
</form>

<? else: ?>

<p>User Is: <?= $this->user->username ?></p>
<a href="/logout">Logout</a>
<? endif; ?>

